using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class CitiesBLL
	{
		private CitiesDAO _CitiesDAO;

		public CitiesDAO CitiesDAO
		{
			get { return _CitiesDAO; }
			set { _CitiesDAO = value; }
		}

		public CitiesBLL()
		{
			CitiesDAO = new CitiesDAO();
		}
		public List<Cities> GetCitiess()
		{
			try
			{
				return CitiesDAO.GetCitiess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public Cities GetCities(int Id)
		{
			try
			{
				return CitiesDAO.GetCities(Id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddCities(Cities oCities)
		{
			try
			{
				return CitiesDAO.AddCities(oCities);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateCities(Cities oCities)
		{
			try
			{
				return CitiesDAO.UpdateCities(oCities);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCities(Cities oCities)
		{
			try
			{
				return CitiesDAO.RemoveCities(oCities);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCities(int Id)
		{
			try
			{
				return CitiesDAO.RemoveCities(Id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<Cities> DeserializeCitiess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<Cities>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeCitiess(string Path, List<Cities> Citiess)
		{
			try
			{
				GenericXmlSerializer<List<Cities>>.Serialize(Citiess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
